Skip to content

Conversation

@arikgreen
Copy link
Contributor

Add a new test case to test jack detection during DSP is in D3 state.
The test will check if the jack detection status is updated correctly when the jack is plugged in and unplugged and also if DSP status is changing correctly as well.
For unplug/plug headset jack is using a USB relay.
https://github.com/darrylb123/usbrelay

@arikgreen arikgreen requested review from a team, golowanow, lgirdwood and marc-hb as code owners October 31, 2025 15:56
@arikgreen arikgreen force-pushed the awilczax/add-test-jack-detection-d3 branch from 50eabd5 to e548c1d Compare October 31, 2025 15:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new test case to verify jack detection functionality when the DSP is in D3 suspended state. The test uses a USB relay to simulate physical jack plug/unplug events and validates that both jack detection status and DSP power state changes are handled correctly.

  • Implements automated jack detection testing using USB relay hardware
  • Validates DSP state transitions during jack events while suspended
  • Includes comprehensive error handling and configuration options

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


# shellcheck disable=SC1091 source=case-lib/lib.sh
source "${TESTLIB}/lib.sh"
# shellcheck disable=SC1091 source=case-lib/relay.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# shellcheck disable=SC1091 source=case-lib/relay.sh
# shellcheck source=case-lib/relay.sh

When someone runs shellcheck outside the top directory, you do want shellcheck to warn them that it cannot find this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marc-hb I applied same as for lib.sh

Copy link
Collaborator

@marc-hb marc-hb Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented only once but I think disable=SC1091 should be removed in both cases.

  • Either people run shellcheck -x from the top-level directory as they should. in that case disable=SC1091 is not needed because shellcheck successfully includes the files.
  • Or, people forget -x or run shellcheck from a different directory. Then, you want the first warning (out of many other warnings) to be "could not find include files". So, you don't want disable=SC1091 there either because you don't want to lose the most important warning.

So you never want disable=SC1091

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks Marc, I agree

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Afraid disable=SC1091 came back :-(
It's in two other files as well.

@arikgreen arikgreen force-pushed the awilczax/add-test-jack-detection-d3 branch 2 times, most recently from d676234 to fd03264 Compare November 5, 2025 09:59
@arikgreen arikgreen force-pushed the awilczax/add-test-jack-detection-d3 branch from fd03264 to 04418c9 Compare November 20, 2025 10:04
@arikgreen arikgreen requested a review from marc-hb November 25, 2025 13:51
Copy link
Contributor

@redzynix redzynix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes needed

@arikgreen arikgreen force-pushed the awilczax/add-test-jack-detection-d3 branch 2 times, most recently from bfa8930 to df930dd Compare November 26, 2025 11:25
Add a new test case to test jack detection during
DSP is in D3 state. The test will check if the jack
detection status is updated correctly when the jack
is plugged in and unplugged and also if DSP status
is changing correctly as well.
For unplug/plug headset jack is using a USB relay.
https://github.com/darrylb123/usbrelay

Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
@arikgreen arikgreen force-pushed the awilczax/add-test-jack-detection-d3 branch from df930dd to 1a2f2a7 Compare November 27, 2025 11:46
@redzynix redzynix merged commit e4b2c87 into thesofproject:main Nov 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants